<!--地图坐落标记-->
<!--
<template>
  <div class="amap-page-container">
    <el-amap vid="amapDemo" :zoom="zoom" :center="center" class="amap-demo">
      <el-amap-marker v-for="marker in markers" :position="marker.position" :events="marker.events" :visible="marker.visible" :draggable="marker.draggable"></el-amap-marker>
    </el-amap>

    <div class="toolbar">
      <button type="button" name="button" v-on:click="toggleVisible">切换第一标记</button>
      <button type="button" name="button" v-on:click="changePosition">改变位置</button>
      <button type="button" name="button" v-on:click="chnageDraggle">改变落后</button>
      <button type="button" name="button" v-on:click="addMarker">增加标记</button>
      <button type="button" name="button" v-on:click="removeMarker">删除标记</button>
    </div>
  </div>
</template>

<style lang="scss">
  .amap-page-container {
    height: 500px;
    text-align: center;
    .toolbar{
      button{
        width: 120px;
        height: 40px;
        margin-top: 10px;
      }
    }
  }
</style>

<script>
  export default {
    name: 'Message1',
    data() {
      return {
        zoom: 14, //地图的缩放
        center: [121.5273285, 31.21515044],
        markers: [
          {
            position: [121.5273285, 31.21515044],//点标记在地图上显示的位置，默认为地图中心点
            events: {
              click: () => {
                alert('click marker');
              },
              dragend: (e) => {
                this.markers[0].position = [e.lnglat.lng, e.lnglat.lat];
              }
            },
            visible: true, //点标记是否可见
            draggable: false //设置点标记是否可以拖拽移动
          }
        ]
      };
    },
    methods: {
      changePosition() {
        let position = this.markers[0].position;
        this.markers[0].position = [position[0] + 0.002, position[1] - 0.002];
      },
      chnageDraggle() {
        let draggable = this.markers[0].draggable;
        this.markers[0].draggable = !draggable;
      },
      toggleVisible() {
        let visableVar = this.markers[0].visible;
        this.markers[0].visible = !visableVar;
      },
      addMarker() {
        let marker = {
          position: [121.5273285 + (Math.random() - 0.5) * 0.02, 31.21515044 + (Math.random() - 0.5) * 0.02]
        };
        this.markers.push(marker);
      },
      removeMarker() {
        if (!this.markers.length) return;
        this.markers.splice(this.markers.length - 1, 1);
      }
    }
  };
</script>
-->
<template>
  <div id="qwe">

  </div>
</template>

<style lang="scss">
</style>

<script>
  export default {
    data() {
      return {}
    }
  }
</script>
